Skip to content

Zero-initialize Matrix values by default#177

Merged
julianlitz merged 2 commits intomainfrom
litz_default_init_matrix
Feb 17, 2026
Merged

Zero-initialize Matrix values by default#177
julianlitz merged 2 commits intomainfrom
litz_default_init_matrix

Conversation

@julianlitz
Copy link
Collaborator

@julianlitz julianlitz commented Feb 13, 2026

  • Zero initialize matrix values by default
  • Clearer folder separation in LinearAlgebra: Vector, Matrix, Solvers
  • Clean up #includes throughout the project

Merge Request - GuideLine Checklist

Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.

Checks by code author:

Always to be checked:

  • There is at least one issue associated with the pull request.
  • New code adheres with the coding guidelines
  • No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

If functions were changed or functionality was added:

  • Tests for new functionality has been added
  • A local test was succesful

If new functionality was added:

  • There is appropriate documentation of your work. (use doxygen style comments)

If new third party software is used:

  • Did you pay attention to its license? Please remember to add it to the wiki after successful merging.

If new mathematical methods or epidemiological terms are used:

  • Are new methods referenced? Did you provide further documentation?

Checks by code reviewer(s):

  • Is the code clean of development artifacts e.g., unnecessary comments, prints, ...
  • The ticket goals for each associated issue are reached or problems are clearly addressed (i.e., a new issue was introduced).
  • There are appropriate unit tests and they pass.
  • The git history is clean and linearized for the merge request. All reviewers should squash commits and write a simple and meaningful commit message.
  • Coverage report for new code is acceptable.
  • No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.15%. Comparing base (7748cf5) to head (be241e2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #177   +/-   ##
=======================================
  Coverage   94.15%   94.15%           
=======================================
  Files          92       92           
  Lines        9524     9529    +5     
=======================================
+ Hits         8967     8972    +5     
  Misses        557      557           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@EmilyBourne EmilyBourne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok to me. Although I don't know if there is an advantage to zero-initialising the matrices in release mode?

@julianlitz
Copy link
Collaborator Author

julianlitz commented Feb 17, 2026

The advantage is that we eliminate this big chunk of code in the buildAsc Give.
We are adding up values and need to ensure that the values are defined as zero beforehand:

https://github.com/SciCompMod/GMGPolar/blob/main/src/Smoother/SmootherGive/buildMatrix.cpp#L669-#L730
@EmilyBourne

@EmilyBourne
Copy link
Collaborator

The advantage is that we eliminate this big chunk of code in the buildAsc Give. We are adding up values and need to ensure that the values are defined as zero beforehand:

https://github.com/SciCompMod/GMGPolar/blob/main/src/Smoother/SmootherGive/buildMatrix.cpp#L669-#L730 @EmilyBourne

Ah! That makes sense. In which case I agree with this PR 👍

@julianlitz julianlitz merged commit 824b501 into main Feb 17, 2026
8 checks passed
@julianlitz julianlitz deleted the litz_default_init_matrix branch February 17, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants